public class PopInputPassword extends PopupWindow {
	//弹出密码输入popwindow
	
    private PwdNumInputView pwdView;
    private View mMenuView;
    private Activity mContext;
    private TextView numshow,numtop;

    public PopInpuyPassword(final Activity context,final String s,final int a) {

        super(context);

        this.mContext = context;
        final LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        mMenuView = inflater.inflate(R.layout.pop_enter_password, null);
        pwdView = (PwdNumInputView) mMenuView.findViewById(R.id.pwd_view);
        numtop=(TextView)mMenuView.findViewById(R.id.ishongbao);
        numshow=(TextView)mMenuView.findViewById(R.id.textAmount);
        numshow.setText("￥"+s); 

        //添加密码输入完成的响应
        pwdView.setOnFinishListener(new Listener_PwdFinish() {
            @Override
            public void done(final String password) {
				Intent intent = new Intent();
				intent.setClass(context,Wx_pay_succss.class);
				intent.putExtra("total",s);
				context.startActivityForResult(intent,Money.SUCCESS);
            }
        });
        // 监听X关闭按钮
        pwdView.getImgCancel().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        // 监听键盘上方的返回
        pwdView.getMoneyNumInputView().getLayoutBack().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        // 设置SelectPicPopupWindow的View
        this.setContentView(mMenuView);
        // 设置SelectPicPopupWindow弹出窗体的宽
        this.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
        // 设置SelectPicPopupWindow弹出窗体的高
        this.setHeight(ViewGroup.LayoutParams.MATCH_PARENT);
        // 设置SelectPicPopupWindow弹出窗体可点击
        this.setFocusable(true);
        // 设置SelectPicPopupWindow弹出窗体动画效果
        this.setAnimationStyle(R.style.pop_add_ainm);
        // 实例化一个ColorDrawable颜色为半透明
        ColorDrawable dw = new ColorDrawable(0x66000000);
        // 设置SelectPicPopupWindow弹出窗体的背景
        this.setBackgroundDrawable(dw);
    }

}

